Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Feature: Relay safe apps sdk getBySafeTxHash api request #2361

Merged
merged 8 commits into from
Jun 3, 2021

Conversation

mmv08
Copy link
Member

@mmv08 mmv08 commented May 31, 2021

What it solves

Relaying transaction details API call from the SDK, some type enhancements needed for safe-global/safe-apps-sdk#104

How this PR fixes it

Adds a handler for the new message method getTxBySafeTxHash and a new API function

How to test it

  1. Use https://github.com/gnosis/safe-test-app
  2. Paste some transaction hash to the input
  3. Click "Get Transaction by safe tx hash"
  4. You should see the response with the transaction in the console

@github-actions
Copy link

CLA Assistant Lite All Contributors have signed the CLA.

@github-actions
Copy link

github-actions bot commented May 31, 2021

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 3 0
Ignored 0 N/A
  • Result: ✅ success

  • Annotations: 3 total


[warning] @typescript-eslint/explicit-module-boundary-types

Require explicit return and argument types on exported functions' and classes' public class methods


Report generated by eslint-plus-action

@github-actions
Copy link

@github-actions
Copy link

@mmv08
Copy link
Member Author

mmv08 commented Jun 3, 2021

@francovenica this is ready for the QA. The ticket is on SDK repo so can't move it to the QA column :(

@francovenica
Copy link
Contributor

francovenica commented Jun 3, 2021

Some clarification.
The "how to test" says that I should use "Safe tx hash", but that one gives me a empty response, so I use "Transaction hash". Is this ok?
image
image

I'll assume is Transaction hash

Tried with the tx 994 from this safe: https://pr2361--safereact.review.gnosisdev.com/rinkeby/app/#/safes/0x9913B9180C20C6b0F21B6480c84422F6ebc4B808/transactions

and this tx hash:
0xfcfceb605a170bdbb3d44aa354113c85ab145842fb57fd4a0e17ff4b305fea7b

I get this response
image

The only value that I see wrong there (that I could confirm) is the nonce. The response says it is 0x2a6 (which is 678) while the safe says it is 994

@mikheevm can you check why the discrepancy there?

@mmv08
Copy link
Member Author

mmv08 commented Jun 3, 2021

Screenshot 2021-06-03 at 15 48 02

@francovenica For me, it's the other way around. I think you might be using the old version of the safe-test-app, could you please check you have the latest changes?

@mmv08
Copy link
Member Author

mmv08 commented Jun 3, 2021

@francovenica
Screenshot 2021-06-03 at 15 51 04

I see you were using the wrong input field. You need to use the one from the screenshot

@francovenica
Copy link
Contributor

I'm the smartest man in the world. Never updated the repo in my computer, so I didn't had that field :D . I'll update it and check it later. Sorry for the mess

@francovenica
Copy link
Contributor

Yes, there it is. Looks good to me
image

Tested here. tx 994
https://pr2361--safereact.review.gnosisdev.com/rinkeby/app/#/safes/0x9913B9180C20C6b0F21B6480c84422F6ebc4B808/transactions

@mmv08 mmv08 merged commit 7ac1e1e into development Jun 3, 2021
@mmv08 mmv08 deleted the feature/apps-relay-getBySafeTxHash branch June 3, 2021 14:54
@github-actions github-actions bot locked and limited conversation to collaborators Jun 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants